#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
int main()
{
	char ch1[250] = { 0 };
	scanf("%[^\n]", ch1);
	int len = strlen(ch1);
	int n = len;
	int count = 0;
	while (n--)
	{
		if (ch1[n] == ' ' || ch1[n] == 'a' || ch1[n] == 'd' || ch1[n] == 'g' || ch1[n] == 'j' || ch1[n] == 'm' || ch1[n] == 'p' || ch1[n] == 't' || ch1[n] == 'w')
			count += 1;
		else if (ch1[n] == 'b' || ch1[n] == 'e' || ch1[n] == 'h' || ch1[n] == 'k' || ch1[n] == 'n' || ch1[n] == 'q' || ch1[n] == 'u' || ch1[n] == 'x')
			count += 2;
		else if (ch1[n] == 'c' || ch1[n] == 'f' || ch1[n] == 'i' || ch1[n] == 'l' || ch1[n] == 'o' || ch1[n] == 'r' || ch1[n] == 'v' || ch1[n] == 'y')
			count += 3;
		else if (ch1[n] == 's' || ch1[n] == 'z')
			count += 4;
	}
	printf("%d\n", count);
	return 0;
}